<template>
  <div id="app">
    <header class="head">
       <a class="back tl" href="javascript:history.back(-1)">
        <i class="el-icon-arrow-left"></i>
      </a>
      <a href="javascript:;" class="tc">
        <small class="font_18 co_f">行政处罚记录</small>
      </a>
      <a href="javascript:;" class="tr">
        <small class="font_18 co_f"></small>
      </a>
    </header>
    <main>
     <div class="none_data" v-if="this.ScoreData.length==0">
          <img src="../../../img/tip.png">
        </div>
      <div class="mtrademark-list-info" v-for="(item,index) in ScoreData">
        <a>
          <div class="mtrademark-list-right">
            <p ng-bind-html="o.name.replace('<em>','')" class="ng-binding">
               {{state[item.item]}}
            </p>
            <p><span class="ng-binding">内容: {{item.contentStr}}</span></p>
            <p><span class="ng-binding">记录人员:{{item.recordName}} </span></p>
            <p><span class="ng-binding">记录时间: {{item.recordDate}}</span></p>
          </div>
        </a>
      </div>
    </main>
  </div>
</template>

<script>
  import {
    SubjectCreditRewardPunishData
  } from '../../../api/api';
  
  export default {
    data() {
      return {
        ScoreData: [],
        state:{
          "0":"行政处罚",
          "1":"移送司法机关处理记录",
          "2":"政府部门行业协会对企业的表彰奖励、典型示范、就业推荐",
        },
        data: "",
        PageSize: 10,
        CurrentPage: 1,
        nonedata: false
      };
    },
    methods: {
      //数据加载方法
      getData() {
        let CurrentPageNum = this.CurrentPage
        let varQueryData = {
          PageSize: this.PageSize,
          CurrentPage: this.CurrentPage,
          Query: {
            CriteriaList: []
          }
        }
        let options = {
          params: {
            Unid: JSON.parse(localStorage.getItem('auth')).enterpriseUnid,
            Type:"行政处罚",
            QueryData: JSON.stringify(varQueryData)
          }
        }
        //调取接口
        SubjectCreditRewardPunishData(options).then((res) => {
          if (res.success === true) {
            this.$store.state.ScoreData = res.data.data;
            this.ScoreData = res.data.data;
            if (res.data.length > 0) {
              this.nonedata = false
            } else {
              if (CurrentPageNum == 1) {
                this.nonedata = true
              } else{
                this.nonedata = false
              }
            }
          }
        })
      },
    },
    //页面加载时候
    mounted() {
      this.getData();
    }
  
  }
</script>

<style lang="scss" scoped>
  /*tab*/
  
  .mint-navbar {
    background: #efefef;
    padding: 0% 20%;
  }
  
  .mint-navbar .mint-tab-item.is-selected {
    background: #feaa50;
    color: #fff;
    border-bottom: none;
    margin-bottom: auto;
  }
  
  .mint-tab-item {
    border: 1px solid #feaa50 !important;
    padding: 10px !important;
    margin: 6px 0px
  }
  
  .mtrademark-list-info a{
    padding: 10px 10px;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid #ccc;
    display: flex;
    display: -webkit-flex;
    justify-content: space-between;
    align-items: center
  }
  
  .mtrademark-list-right {
    float: left;
    line-height: normal;
    margin-left: 10px;
  }
  
  .mtrademark-list-right p:first-child {
    margin-bottom: 5px;
    font-size: 16px;
    color: #000
  }
  
  .mtrademark-list-right p {
    font-size: 12px;
    color: #43464f;
    display: block;
    margin: 0;
  }
  
  .mtrademark-list-right span {
    display: block;
    margin-top: 6px;
  }
  
  #mtrademark-list-right-status {
    display: table;
    margin: 10px 0;
    border: 1px solid #5BC67C;
    color: #5BC67C;
    float: left;
    padding: 2px;
    border-radius: 2px;
  }
</style>

<!-- Add "scoped" attribute to limit CSS to this component only -->
